<script setup>
  import { useRouter } from 'vue-router'
  import { ref } from 'vue'
  //==菜单按钮以及标签页管理==============================================
  const menuList = ref([])
  let routes = useRouter()
  routes.options.routes.forEach((m) => {
    console.log(m);
    menuList.value.push(m)
  })
</script>

<template>
  <div class="root">
    <div class="menu">
      <div v-for="item in menuList">
        <router-link :to="item.path">{{item.meta.title}}</router-link>
      </div>
    </div>
    <router-view></router-view>
  </div>
</template>

<style scoped>
.root{
  width: 100%;
  height: 100%;
}
.menu{
  display: flex; gap: 10px;
}
</style>
